package com.egoo.ticket.server.dao;

import com.egoo.ticket.server.pojo.entity.EwsUser;
import com.egoo.ticket.server.pojo.vo.InteractiveDataVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
public interface EwsUserDao {
	/**
	 * TODO 通过id查询对应用户
	 * @param id
	 * @return
	 */
	EwsUser selectById(@Param("id") String id);

	/**
	 * TODO 批量插入
	 * @param ewsUsers
	 * @return
	 */
	Long insertBatch(@Param("ewsUsers") List<EwsUser> ewsUsers);

	/**
	 * TODO 删除所有
	 * @return
	 * @param tenantId
	 */
	Long deleteAllUser(@Param("tenantId") String tenantId);

	/**
	 * TODO 批量更新
	 * @param ewsUsers
	 * @return
	 */
	Long updateBatch(@Param("ewsUsers") List<EwsUser> ewsUsers);

	/**
	 * TODO 更新
	 * @param ewsUser
	 * @return
	 */
	Long update(@Param("ewsUser") EwsUser ewsUser);

	/**
	 * TODO 通过角色信息查询用户列表
	 * @param searchMap
	 * @return
	 */
	List<EwsUser> selectUserListByRoleInfo(Map<String, Object> searchMap);

	/**
	 * TODO 查询所有用户列表
	 * @param searchMap
	 * @return
	 */
	List<EwsUser> selectAllUserList(Map<String, Object> searchMap);

	/**
	 * TODO
	 * @param searchMap
	 * @return
	 */
	List<InteractiveDataVo> selectInteractiveUsers(Map<String, Object> searchMap);

	Integer deleteByMap(Map<String,Object> map);
}
